<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
<div class="page-container">
	<form action="${contextPath}/resource/resource_update" method="post" class="form form-horizontal" id="form-resource">
	<input type="hidden"  name="parentId" id="pid" value="${(resource.parentId?c)!}"/>
	<input type="hidden"  name="resourceId" id="resourceId" value="${(resource.id?c)!}"/>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">
				<span class="c-red">*</span>
				资源名称：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text" value="${resource.name}" placeholder="" id="name" name="name">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">
				资源编号：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text" value="${resource.number}" placeholder="" id="number" name="number">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">
				请求地址：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text" value="${resource.url}" placeholder="" id="url" name="url">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">类型：</label>
			<div class="formControls col-xs-6 col-sm-6">
			<#if resource.type =1>
				<input type="radio" name="type" value="1" checked="checked" /> 模块
				<input type="radio" name="type" value="2" /> 资源
			
			 <#elseif resource.type = 2>
				<input type="radio" name="type" value="1"  /> 模块
				<input type="radio" name="type" value="2" checked="checked" /> 资源
			</#if>
			</div>
		</div>
		<div class="row cl">
			<div class="col-9 col-offset-2">
				<input class="btn btn-primary radius" type="button" onclick="add();"  value="&nbsp;&nbsp;增加&nbsp;&nbsp;">
				<input class="btn btn-primary radius" type="button" onclick="deleteresource();"  value="&nbsp;&nbsp;删除&nbsp;&nbsp;">
				<input class="btn btn-primary radius" type="button" onclick="update();"  value="&nbsp;&nbsp;修改&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</div>
<@frame.end "default">
</@frame.end>
<script type="text/javascript" src="${contextPath}/resources/lib/zTree/v3/js/jquery.ztree.core-3.5.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script> 
<script type="text/javascript" src="${contextPath}/resources/js/system/resource.js"></script> 
<script type="text/javascript">
var path="${contextPath}";

</script>
</body>
</html>